import useConsultStore from "@/pinia/modules/consultStore.ts";
import { showFailToast, showImagePreview } from "vant";

const consultStore = useConsultStore();

export const useLookPre = async (id:string):Promise<void> => {
    try {
        const url: string = await consultStore.fetchPrescriptionPic(id);
        showImagePreview([url]);
    } catch (error: any) {
        showFailToast(error.message);
    }
};


export default useLookPre;
